package com.hanhanxiaochong.zhongxiangchuanmei.view.my.adapter;

import android.content.Context;

import com.hanhanxiaochong.zhongxiangchuanmei.R;
import com.hanhanxiaochong.zhongxiangchuanmei.bean.InfoListBean;
import com.hanhanxiaochong.zhongxiangchuanmei.config.CommonAdapter;
import com.hanhanxiaochong.zhongxiangchuanmei.config.ViewHolder;

import java.util.List;

/**
 * Author : 贾桐
 * E-mail : 653773284@qq.com
 * Time   : 2018/4/16.
 * Desc   :
 */

public class MsgAdapter extends CommonAdapter<InfoListBean>{

    public MsgAdapter(Context context, int layoutId, List<InfoListBean> datas) {
        super(context, layoutId, datas);
    }

    @Override
    protected void convert(ViewHolder holder, InfoListBean bean, final int position) {
        holder.setText(R.id.tv_msg_title,bean.getTitle());
        holder.setText(R.id.tv_msg_time,bean.getAdd_time());
        holder.setText(R.id.tv_msg_content,bean.getContent());
        holder.setOnClickListener(R.id.item_announcement, v -> mOnItemClickListener.onItemClick(MsgAdapter.this, position));
    }
}
